package com.ruoyi.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.ProcOrderExecutionMapper;
import com.ruoyi.purchase.domain.ProcOrderExecution;
import com.ruoyi.purchase.service.IProcOrderExecutionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购订单执行记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
@Service
public class ProcOrderExecutionServiceImpl implements IProcOrderExecutionService 
{
    @Autowired
    private ProcOrderExecutionMapper procOrderExecutionMapper;

    /**
     * 查询采购订单执行记录
     * 
     * @param executionId 采购订单执行记录主键
     * @return 采购订单执行记录
     */
    @Override
    public ProcOrderExecution selectProcOrderExecutionByExecutionId(Long executionId)
    {
        return procOrderExecutionMapper.selectProcOrderExecutionByExecutionId(executionId);
    }

    /**
     * 查询采购订单执行记录列表
     * 
     * @param procOrderExecution 采购订单执行记录
     * @return 采购订单执行记录
     */
    @Override
    public List<ProcOrderExecution> selectProcOrderExecutionList(ProcOrderExecution procOrderExecution)
    {
        return procOrderExecutionMapper.selectProcOrderExecutionList(procOrderExecution);
    }

    /**
     * 新增采购订单执行记录
     * 
     * @param procOrderExecution 采购订单执行记录
     * @return 结果
     */
    @Override
    public int insertProcOrderExecution(ProcOrderExecution procOrderExecution)
    {
        return procOrderExecutionMapper.insertProcOrderExecution(procOrderExecution);
    }

    /**
     * 修改采购订单执行记录
     * 
     * @param procOrderExecution 采购订单执行记录
     * @return 结果
     */
    @Override
    public int updateProcOrderExecution(ProcOrderExecution procOrderExecution)
    {
        return procOrderExecutionMapper.updateProcOrderExecution(procOrderExecution);
    }

    /**
     * 批量删除采购订单执行记录
     * 
     * @param executionIds 需要删除的采购订单执行记录主键
     * @return 结果
     */
    @Override
    public int deleteProcOrderExecutionByExecutionIds(String executionIds)
    {
        return procOrderExecutionMapper.deleteProcOrderExecutionByExecutionIds(Convert.toStrArray(executionIds));
    }

    /**
     * 删除采购订单执行记录信息
     * 
     * @param executionId 采购订单执行记录主键
     * @return 结果
     */
    @Override
    public int deleteProcOrderExecutionByExecutionId(Long executionId)
    {
        return procOrderExecutionMapper.deleteProcOrderExecutionByExecutionId(executionId);
    }
}
